package com.xjgc.eip.twice.zxjeip2cjdq.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjgc.eip.twice.zxjeip2cjdq.entity.ZxjEip2cJdq;
import com.xjgc.eip.twice.zxjeip2cjdq.mapper.ZxjEip2cJdqMapper;
import com.xjgc.eip.twice.zxjeip2cjdq.service.ZxjEip2cJdqService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhanghongbin
 * @since 2019-11-23
 */
@Service
@DS("proxyDs")
public class ZxjEip2cJdqServiceImpl extends ServiceImpl<ZxjEip2cJdqMapper, ZxjEip2cJdq> implements ZxjEip2cJdqService {
    @Override
    public Result<IPage<ZxjEip2cJdq>> queryPageList(ZxjEip2cJdq Jdq, Integer pageNo, Integer pageSize, HttpServletRequest req) {
        Result<IPage<ZxjEip2cJdq>> result = new Result<IPage<ZxjEip2cJdq>>();
        QueryWrapper<ZxjEip2cJdq> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(Jdq);
        Page<ZxjEip2cJdq> page = new Page<ZxjEip2cJdq>(pageNo, pageSize);
        IPage<ZxjEip2cJdq> pageList = super.page(page, queryWrapper);
        result.setSuccess(true);
        result.setResult(pageList);
        return result;
    }
}
